<?php  
namespace Wap;
use Think\Controller;
use Wap\AutoLoginController;

/**
* 
*/
class WapController extends AutoLoginController
{
	function _initialize(){
		parent::_initialize();
	
		if(session('user')==null){
			$temps = explode(__APP__,__SELF__);
			
			$pos = strpos($temps[1],".html");
			if($pos != null){
				$preUrl = substr($temp,0,$pos);
			}else {
				$preUrl = $temp;
			}		
			session('temp',$temp);
			session('pos',$pos);
			session('preUrl',$preUrl);
			//在非debug模式下，手机端在这里出错
			$this->redirect("/User/Login/loginPage", null,0,'您还未登陆！');
			//$this->show($preUrl.','.$pos.','.$temp, 'utf-8', 'text/xml');   
		}
	}
}

?>